The present invention relates to a printing apparatus having a head unit with a printhead and a main unit with a control circuit for executing printing control of the printhead, a control method of the apparatus, and a computer-readable memory.
Note that the present invention is applicable not only to a general printing apparatus but also to a copying machine, a facsimile apparatus having a communication system, a word processor having a printing unit, and an industrial printing apparatus combined with various processors.
In a conventional inkjet printer for performing printing by discharging ink by heat generated by a heater, the discharge state changes depending on the heated state of a printhead including the heater. To perform accurate discharge control, an accurate printhead temperature must be acquired. To more accurately acquire the printhead temperature and use it for each control, an analog output concerning temperature information from the printhead is converted into a digital output, which is used for each control.
The conventional inkjet printer informs a main unit for controlling printing of temperature information of the printhead using an analog signal from a head unit which mounts the printhead. In this case, the main unit must A/D-convert the received analog signal. When this A/C conversion processing contends with another A/D conversion processing, for example, the main unit executes another A/D conversion processing, no accurate value can be attained. In addition, software processes contend with each other owing to an AID conversion processing end interrupt or the like, and may cause deadlock in the worst case. To prevent this, exclusive control must be done. If the temperature is to be determined on the main unit side in consideration of this exclusive control, it takes a long time to determine the temperature. A system using a real-time as may suffer in performing a task during which the system cannot perform processing by exclusive control and must wait.
According to another method, the temperature is detected with higher precision by acquiring, a plurality of number of times, digital signal values obtained by converting analog signals received from the head unit on the main unit side, and determining the average of all the acquired digital signal values as the printhead temperature. Even in this case, however, the distance of a signal line from the head unit to the main unit is long in terms of the printer structure. Noise may be generated in an analog signal received by the main unit, and an analog signal having an excessively large or small value may be mixed to localize the average value of digital values obtained based on the analog signal. Solving this problem requires a check routine for checking whether the value of a digital signal is valid.
From this, it is difficult to perform accurate discharge control based on an obtained temperature.
The present applicant has proposed arrangements for solving this problem by converting an analog temperature detection signal into a digital signal in the head unit and transmitting the digital signal to the main unit.
In these arrangements, however, the following problems arise in performing more accurate temperature detection.
1. When an analog temperature value is converted into a digital value in the head unit, the digital value changes depending on fluctuations of the detected temperature and small variations of the analog signal. It is not always easy to output a digital value which reflects an accurate temperature.
2. Even if analog signals are converted into digital signals to output the digital signals a plurality of number of times within a short time in synchronism with clock signals, a plurality of different digital values may be output. It is not easy to determine which value reflects the true temperature.
Noise may be generated in an analog signal, and an excessively large or small value may be mixed to localize the obtained value to one side.
3. When an analog signal is converted into a digital signal of a plurality of bits, bit inversion (bits xe2x80x9c1xe2x80x9d and xe2x80x9c0xe2x80x9d are replaced) may occur around the threshold of the temperature in conversion into a digital value, and an error may occur in conversion into a digital value.
The present invention has been made to overcome the conventional drawbacks, and has as its object to provide a printing apparatus which is highly resistant to a disturbance such as noise and can execute accurate printing control by more accurately detecting the printhead temperature, a control method of the apparatus, and a computer-readable memory.
A printing apparatus according to the present invention for achieving the above object has the following arrangement. That is, a printing apparatus comprises a head unit with a printhead and a main unit with a control circuit for executing printing control of the printhead, the head unit comprising generation means for detecting a temperature of the printhead a plurality of number of times and generating a plurality of digital signals corresponding to respective temperatures, determination means for determining a digital signal serving as the temperature of the printhead on the basis of the plurality of digital signals generated by the generation means, and transmission means for transmitting the digital signal determined by the determination means to the main unit, and the main unit comprising reception means for receiving the digital signal transmitted from the head unit, and execution means for executing printing control of the printhead on the basis of the digital signal received by the reception means.
This arrangement can prevent deviation of a detected value caused by variations of an analog signal output which readily occurs upon only one temperature detection.
Preferably, the determination means determines the largest number of digital signals having the same value among the plurality of digital signals generated by the generation means as a digital signal serving as the temperature of the printhead.
Preferably, the determination means comprises discrimination means for, when the generation means detects the temperature of the printhead an odd number of times and generates an odd number of digital signals corresponding to respective temperatures, discriminating kinds of digital signals constituting the odd number of digital signals, and the determination means determines a digital signal serving as the temperature of the printhead from the odd number of digital signals on the basis of a discrimination result of the discrimination means.
Preferably, when a kind of digital signal largest in number does not exist among the digital signals constituting the odd number of digital signals, and the number of kinds of digital signals is an even number, digital signals smallest in number and belonging to the same kind are deleted, and the determination means determines digital signals belonging to an intermediate kind among the odd number of kinds of digital signals as digital signals serving as the temperature of the printhead.
Preferably, when a kind of digital signal largest in number does not exist among the digital signals constituting the odd number of digital signals, number of kinds of digital signals is an odd number, the determination means determines digital signals belonging to an intermediate kind among the odd number of kinds of digital signals as digital signals serving as the temperature of the printhead.
According to these aspects, digital signals are output a plurality of number of times, so that a value nearer the true head temperature can be detected even with different output values.
A control method of a printing apparatus according to the present invention for achieving the above object has the following steps. That is, a control method of a printing apparatus having a head unit with a printhead and a main unit with a control circuit for executing printing control of the printhead comprises the generation step of detecting a temperature of the printhead a plurality of number of times and generating a plurality of digital signals corresponding to respective temperatures, the determination step of determining a digital signal serving as the temperature of the printhead on the basis of the plurality of digital signals generated in the generation step, the transmission step of transmitting the digital signal determined in the determination step from the head unit to the main unit, the reception step of receiving the digital signal transmitted from the head unit by the head unit, and the execution step of executing printing control of the printhead on the basis of the digital signal received in the reception step.
A computer-readable memory according to the present invention for achieving the above object has the following program codes. That is, a computer-readable memory storing program codes of control of a printing apparatus having a head unit with a printhead and a main unit with a control circuit for executing printing control of the printhead comprises a program code of the generation step of detecting a temperature of the printhead a plurality of number of times and generating a plurality of digital signals corresponding to respective temperatures, a program code of the determination step of determining a digital signal serving as the temperature of the printhead on the basis of the plurality of digital signals generated in the generation step, a program code of the transmission step of transmitting the digital signal determined in the determination step from the head unit to the main unit, a program code of the reception step of receiving the digital signal transmitted from the head unit by the head unit, and a program code of the execution step of executing printing control of the printhead on the basis of the digital signal received in the reception step.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.